//
//  CarConfigCell.m
//  New_Runway
//
//  Created by mack on 2018/1/26.
//  Copyright © 2018年 NelsonJ. All rights reserved.
//

#import "CarConfigCell.h"

@implementation CarConfigCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addAllViews];
        self.contentView.backgroundColor = [UIColor whiteColor];
    }
    return self;
}


- (void)addAllViews
{
    kSelfWeak;
    
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = UIColorHex(0xe1e1e1);
    [self.contentView addSubview:view];
    
    [view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(weakSelf.contentView);
        make.bottom.equalTo(weakSelf.contentView);
        make.height.mas_offset(0.5);
    }];
   
    self.leftImage = [[UIImageView alloc] init];
    [self.contentView addSubview:self.leftImage];
    [self.leftImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(weakSelf.contentView);
        make.left.equalTo(weakSelf.contentView).mas_offset(15);
    }];
    self.label = [[UILabel alloc] init];
    self.label.textColor = MAIN_FONT_COLOR();
    self.label.font = [UIFont systemFontOfSize:12];
    [self.contentView addSubview:self.label];
    [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf.leftImage).mas_offset(25);
        make.centerY.equalTo(weakSelf.contentView);

    }];
    
    
    
    
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
